stack: Fix a corner-case
authorMatthias Clasen <mclasen@redhat.com>
Wed, 13 Feb 2019 14:00:00 +0000 (09:00 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 13 Feb 2019 14:00:00 +0000 (09:00 -0500)
When the stack goes empty, we were failing to reset
the visible_child member to NULL, causing problems later
on, since we don't have a ref for it.

gtk/gtkstack.c

index c1c843a45a2f706ccedea70feb0639ef8e483482..ba80e9faf36ca66e6828dbb109ed76adcaadb6d2 100644 (file)
@@ -1140,9 +1140,6 @@ set_visible_child (GtkStack               *stack,
   if (child_info == priv->visible_child)
     return;
 
-  if (child_info == NULL)
-    return;
-
   if (priv->pages)
     {
       guint position;